package tech.aistar.corejava.day17.reflection;

/**
 *  <bean id="car" class="tech.aistar.Car">
        <property name="name" value="tom"></property>
     </bean>
 * @author success
 * @version 1.0
 * @description:本类用来演示:反射获取该类中的所有的信息
 * @date 2019/8/6 0006
 */
public class Point {
    private int x;

    private String y;

    public Point(){
        System.out.println("Point...");
    }

    public Point(int x,String y){
        this.x = x;
        this.y = y;
        System.out.println("int x,String y...");
    }

    public void test(){
        System.out.println("Test()...");
    }

    public void test(int age){
        this.x = age;
        System.out.println("age...");
    }

    public void test(int age,String name){
        this.x = age;
        this.y = name;
        System.out.println("age,name");
    }

    private void testPrivate(){
        System.out.println("私有的...");
    }

    public static void staticMethod(){
        System.out.println("静态的...");
    }

    public String get(){
        return "string";
    }



    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Point{");
        sb.append("x=").append(x);
        sb.append(", y='").append(y).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
